package cn.aylog.recursion;

import java.util.Arrays;

/**
 * 数据结构与算法 之
 *  递归
 *  自己调用自己
 */
public class Main {
    public static void main(String[] args) {
//        System.out.println(recursionCalc(20));
        int arr[][] = new int[3][4];
        int row = arr.length;
        int col = arr[0].length;
        System.out.printf("row=%d, col=%d", row, col);
    }

    /**
     * 递归实现阶乘
     */
    public static double recursionCalc(int n) {
        if(n <= 2) {
            return n;
        } else {
            return n * recursionCalc(n-1);
        }
    }
}
